package com.example.demo.Service;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: H_tao_X
 * Date: 2022-07-18
 * Time: 15:40
 */

@Controller
@ResponseBody
@Slf4j // 替代了之前需要通过 LoggerFactory.getLogger 操作
public class UserService {
        @RequestMapping("/sayhi2")
        public void sayHi2() {
                log.trace("我是 trace");
                log.debug("我是 debug");
                log.info("我是 info");
                log.warn("我是 warn");
                log.error("我是 error");
        }
}
